<?php
	include 'ZionHeader.inc';
?>
<HTML>
<head>
<title>ZionsAuto</title>

  <link rel="stylesheet" href="styles.css" type="text/css" />

   
</head>
<BODY>
<h1><center>Edit An Announcement</center></h1>

<!-- Tab Menu Goes here -->
<div id="tabs">
  <ul>
    <li><a href="homePage.php"><span>Home</span></a></li>
    <li><a href="Browse.php"><span>Browse</span></a></li>
    <li><a href="logout.php"><span>Log Out</span></a></li>
  </ul>
</div>

<div id="postAnnouncements">

<?php
	$request = $_POST['ID'];
	include 'DatabaseConnect.inc';
	//echo $request;
	$query = "SELECT * FROM Vehicle WHERE ID = $request" ;
	$result = mysql_query($query);
	while($row = mysql_fetch_array( $result, MYSQL_ASSOC )) {
	//print_r($result);
	
	echo "<table border='1'>";
	echo "<form action='AlterAnnouncement.php' method='post' name='announcement_form' >";
	echo "<h3> Make </h3>";
	echo "<textarea cols=11 rows=1 name='make' wrap=virtual>";
	echo $row['Make'];
	echo "</textarea>";
	echo "<h3> Model </h3>";
	echo "<textarea cols=11 rows=1 name='model' wrap=virtual>";
	echo $row['Model'];
	echo "</textarea>";
	echo "<h3> Year </h3>";
	echo "<textarea cols=4 rows=1 name='year' wrap=virtual>";
	echo $row['Year'];
	echo "</textarea>";
	echo "<h3> Price </h3>";
	echo "<textarea cols=11 rows=1 name='price' wrap=virtual>";
	echo $row['Price'];
	echo "</textarea>";
	//echo "<h3> Vin </h3>";
	echo "<input type='hidden' name='vin' value =";
	echo $row['VIN'];
	echo ">";
	//echo ;
	//echo "</textarea>";
	echo "<h3> Cylinder </h3>";
	echo "<textarea cols=8 rows=1 name='cylinder' wrap=virtual>";
	echo $row['Cylinder'];
	echo "</textarea>";
	echo "<h3> Drive </h3>";
	echo "<textarea cols=11 rows=1 name='drive' wrap=virtual>";
	echo $row['Drive'];
	echo "</textarea>";
	echo "<h3> Color </h3>";
	echo "<textarea cols=11 rows=1 name='color' wrap=virtual>";
	echo $row['Color'];
	echo "</textarea>";
	echo "<h3> Description </h3>";
	echo "<textarea cols=20 rows=5 name='description' wrap=virtual>";
	echo $row['Description'];
	echo "</textarea>";
	echo "<h3> Mileage </h3>";
	echo "<textarea cols=11 rows=1 name='mileage' wrap=virtual>";
	echo $row['Mileage'];
	echo "</textarea>";
	echo "<h3> Number of Doors </h3>";
	echo "<textarea cols=11 rows=1 name='numberofdoors' wrap=virtual>";
	echo $row['NoDoors'];
	echo "</textarea>";
	echo "<h3> Photo </h3>";
	$photo = $row['Photo'];
	//echo $photo;
	
	echo "<input type='file' name='photo' size=30 value=  $photo /> ";
	//echo $row['Photo'] ;
	//echo ">";
	echo "<p><input type='submit' value='Post'></p>";
	echo "</form>";
	}
?>
</div>



<!-- Footer Goes Here -->
<!--
<div id="footer">
<hr>
<P>(C)Copyright 2011 Zion's DBA. All Rights Reserved</P>
</div>
-->

</BODY>
</HTML>